import request from '../utils/request';

/**
 * 获取所有聊天消息
 * @returns {Promise<Array>} 消息列表
 */
export function getMessages(chatId) {
    return request({
        url: "/messages/list",
        method: "get",
        params: {
            chatId: chatId
        }
    });
}

/**
 * 删除所有消息（清空聊天）
 * @returns {Promise<void>}
 */
export function deleteAllMessages(chatId) {
    return request({
        url: "/messages/deleteAll",
        method: "delete",
        params: {
            chatId: chatId
        }
    });
}

/**
 * 获取记忆ID
 * @returns {Promise<AxiosResponse<any>> | *}
 */
export function getMemoryId() {
    return request({
        url: "/messages/getMemoryId",
        method: "get",
    });
}
